package com.lutzyt.delivery.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.apache.ibatis.type.JdbcType;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 *
 * @author zyt
 */
@Data
@TableName("`order`")
public class Order {
  /**
   *
   */
  @TableId(value = "id", type = IdType.AUTO)
  private Integer id;
  /**
   * 订单总金额
   */
  @TableField("amount")
  private BigDecimal amount;

  private String number;

  /**
   * 店铺id
   */
  @TableField("shop_id")
  private Integer shopId;
  /**
   * 店铺名称
   */
  @TableField("shop_name")
  private String shopName;
  /**
   * 店铺地址
   */
  @TableField("shop_address")
  private String shopAddress;
  /**
   * 订单状态:INIT(创建),CANCEL(取消)
   */
  @TableField("state")
  private String state;
  /**
   * 优惠券
   */
  @TableField("discount_coupon_id")
  private Integer discountCouponId;
  /**
   * 逻辑删除
   */
  @TableField("deleted")
  private Integer deleted;
  /**
   * 版本
   */
  @TableField("fversion")
  private Integer fversion;
  /**
   * 备注
   */
  @TableField("remark")
  private String remark;
  /**
   * 客户id
   */
  @TableField("customer_id")
  private Integer customerId;
  /**
   * 客户地址
   */
  @TableField("customer_address")
  private String customerAddress;
  /**
   * 客户姓名
   */
  @TableField("customer_name")
  private String customerName;

  private Date createTime;
  @TableField(jdbcType = JdbcType.DATE)
  private Date createDate;
  /**
   * 优惠金额
   */
  @TableField("discount_coupon_amount")
  private BigDecimal discountCouponAmount;
  /**
   * 配送骑手id
   */
  @TableField("horseman_id")
  private Integer horsemanId;
  /**
   * 骑手名称
   */
  @TableField("horseman_name")
  private String horsemanName;

  @TableField(exist = false)
  private String comment;

  /**
   * 订单项
   */
  @TableField(exist = false)
  private List<OrderItem> list;
}